layout_alignParentRight
1 | <LinearLayout |
1 | Consider replacing `android:layout_alignParentRight` with `android:layout_alignParentEnd="true"` to better support right-to-left layouts |
?android:attr/buttonBarButtonStyle
1 | Buttons in button bars should be borderless; use `style="?android:attr/buttonBarButtonStyle"` (and `?android:attr/buttonBarStyle` on the parent) |
Button 和 其父视图 都需要加上对应的属性1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19<LinearLayout
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:gravity="center_vertical"
android:orientation="horizontal"
style="?android:attr/buttonBarStyle" >
<Button
android:id="@+id/id_fullscreen_filter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:background="@null"
android:text="@string/filter"
android:textColor="@color/red"
android:textSize="20sp"
android:visibility="gone"
style="?android:attr/buttonBarButtonStyle" />